home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7707 < prev    next >
Encoding:
Text File  |  1996-08-05  |  978 b   |  38 lines

  1. Path: news.u-net.com!news
  2. From: charlotte@parmo.u-net.com (Thomas Christensen)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: DLL's with classes in them
  5. Date: Sun, 25 Feb 1996 13:20:54 GMT
  6. Organization: U-NET limited
  7. Message-ID: <4gpnpk$kfp@nuntius.u-net.net>
  8. References: <312C9B55.71F3@dial.pipex.com> <4gkvhk$b1v@nms.telepost.no>
  9. Reply-To: thc@mailhost.net
  10. NNTP-Posting-Host: parmo.u-net.com
  11. X-Newsreader: Forte Free Agent v0.55
  12.  
  13. Carsten Arnholm <ca@sesam.dnv.no> wrote:
  14. ...
  15. >Unfortunately, I do not believe this is possible. DLL's support only C-style
  16. >API functions. You can have objects inside & outside the DLL, but you cannot
  17. >import or export such objects.
  18.  
  19. Just a thought:
  20. How does Microsoft Foundation Class library do it, then?
  21.  
  22. In the VC 4.0 you'd define a exportable class in this way:
  23.  
  24. #define DllExport    __declspec( dllexport )
  25.  
  26. class DllExport magic {
  27. public:
  28.     int mymagic;
  29. };
  30. ...
  31.  
  32. This class you can use in your application in any way you'd wish.
  33.  
  34. Thomas Christensen
  35.  
  36.  
  37.  
  38.